package ooday03;
//接口测试类
public class SwimTest {
    public static void main(String[] args) {
        Dog dog = new Dog("小黑",3,"黑");
        dog.eat();          //Dog类重写之后的
        dog.drink();        //复用Animal类的
        dog.swim();         //Dog类重写之后的
        dog.lookHome();     //Dog类所特有的
        System.out.println("-----------------------------");
        Chick chick = new Chick("小白",2,"白");
        chick.eat();        //Chick类重写的
        chick.drink();      //复用Animal类的
        chick.layEggs();    //Chick类所特有的
        System.out.println("-----------------------------");
        Fish fish = new Fish("小蓝",1,"蓝");
        fish.eat();         //Fish类重写的
        fish.drink();       //复用Animal类的
        fish.swim();        //Fish类重写的
    }
}
